Conversation
Replace gRPC server, gRPC-gateway, and associated middleware with connectRPC following the pattern established by Compass. This gives us native support for Connect, gRPC, and gRPC-Web protocols on a single HTTP port with standard net/http routing. Key changes: - buf.gen.yaml: switch to v2 with connectrpc/go plugin - Server: use http.ServeMux + connectRPC handler + h2c + CORS - API handlers: adopt connect.Request/Response generics - CLI client: use connectRPC client over plain HTTP - Middleware: add recovery, logger, error_response interceptors - Errors: replace GRPCStatus() with connect error codes - Config: remove GRPCConfig/NewRelic, add CORS config - Delete grpc-gateway, openapiv2, and custom validator packages
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 22 minutes and 11 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (6)
📒 Files selected for processing (41)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
net/httprouting8ef3e30(feat(stencil): migrate proto to connectRPC with buf.validate proton#481)Changes
Code generation
buf.gen.yamlupgraded to v2 withprotocolbuffers/go+connectrpc/gopluginsproto/togen/Server (
internal/server/)http.ServeMux+ connectRPC handler + h2c + CORSgraceful.go,newrelic.go(inlined shutdown, dropped NewRelic)API handlers (
internal/api/)connect.Request[T]/connect.Response[T]genericshttp.ServeMuxpatternsping.go), replaced with plain HTTP/pingCLI client (
cmd/)grpc.Dialconnect.Errorcodes instead ofgrpc/statusMiddleware (
internal/middleware/)recovery.go,logger.go,error_response.gointerceptorsStorageErrto proper connect error codesErrors & formats
StorageErr.GRPCStatus()→StorageErr.ConnectError()runtime.HTTPStatusError→connect.NewErrorin avro/json/protobuf format packagesConfig
GRPCConfig,NewRelicConfigCORSConfig, flatMaxRecvMsgSize/MaxSendMsgSizeRemoved
proto/directory (old generated code, swagger docs)pkg/validator/(replaced byconnectrpc.com/validate)grpc-gateway,go-grpc-middleware,nrgrpcdependenciesTest plan
go build ./...passesgo test ./...passes (except pre-existingformats/protobuffailure due to missingprotoc)grpcurlcurl/pingreturnspong